hip.api.graphics.g2d.g2d_binding

Undocumented in source.

Public Imports

hip.api.data.commons
public import hip.api.data.commons;
Undocumented in source.
hip.api.renderer.operations
public import hip.api.renderer.operations;
Undocumented in source.
hip.api.graphics.color
public import hip.api.graphics.color;
Undocumented in source.
hip.api.graphics.g2d.animation
public import hip.api.graphics.g2d.animation;
Undocumented in source.
hip.api.renderer.viewport
public import hip.api.renderer.viewport;
Undocumented in source.
hip.api.data.font
public import hip.api.data.font;
Undocumented in source.
hip.api.data.tilemap
public import hip.api.data.tilemap;
Undocumented in source.
hip.api.graphics.text
public import hip.api.graphics.text;
Undocumented in source.
hip.graphics.g2d.renderer2d
public import hip.graphics.g2d.renderer2d;
Undocumented in source.

Members

Aliases

Spritesheet
alias Spritesheet = Array2D_GC!IHipTextureRegion
Undocumented in source.

Classes

Array2D_GC (from hip.util.data_structures)
class Array2D_GC(T) via public import hip.util.data_structures : Array2D, Array2D_GC;
Undocumented in source.
HipG2DBinding
class HipG2DBinding
Undocumented in source.

Functions

cropSpritesheetRowsAndColumns
Array2D_GC!IHipTextureRegion cropSpritesheetRowsAndColumns(IHipTexture t, uint rows, uint columns)
Undocumented in source. Be warned that the author may not have intended to support it.
initG2D
void initG2D()
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin ExpandClassFunctionPointers!HipG2DBinding
Undocumented in source.

Static variables

cropSpritesheet
Array2D_GC!IHipTextureRegion function(IHipTexture t, uint frameWidth, uint frameHeight, uint width = 0, uint height = 0, uint offsetX = 0, uint offsetY = 0, uint offsetXPerFrame = 0, uint offsetYPerFrame = 0) cropSpritesheet;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
drawEllipse
void function(int x, int y, int radiusW, int radiusH, int degrees = 360, in HipColor color = HipColor.no, int precision = 24) drawEllipse;

Draws unfilled circle

drawLine
void function(int x1, int y1, int x2, int y2, in HipColor color = HipColor.no) drawLine;

Draws a line from (x1, y1) to (x2, y2)

drawMap
void function(IHipTilemap reg) drawMap;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
drawPixel
void function(int x, int y, in HipColor color = HipColor.no) drawPixel;

Draw a pixel at (x, y) with the color specified at setGeometryColor

drawQuadraticBezierLine
void function(int x0, int y0, int x1, int y1, int x2, int y2, int precision = 24, in HipColor color = HipColor.no) drawQuadraticBezierLine;

Draws a line using bezier points. The higher the precision, the smoother the line, the heavier it is to execute

drawRectangle
void function(int x, int y, int w, int h, in HipColor color = HipColor.no) drawRectangle;

Draws an unfilled rectangle

drawRegion
void function(IHipTextureRegion reg, int x, int y, int z = 0, HipColor = HipColor.white, float scaleX = 1, float scaleY = 1, float rotation = 0) drawRegion;

Draws a texture region at a specified place

drawSprite
void function(IHipTexture texture, ubyte[] vertices) drawSprite;

Draws the target sprite instance

drawText
void function(string text, int x, int y, HipColor color = HipColor.white, HipTextAlign alignH = HipTextAlign.CENTER, HipTextAlign alignV = HipTextAlign.CENTER, int boundsWidth = -1, int boundsHeight = -1, bool wordWrap = false) drawText;

Draws a text using the last font set

drawTextVertices
void function(void[] vertices, IHipFont font) drawTextVertices;

Draw text using those vertices. Low level API

drawTexture
void function(IHipTexture reg, int x, int y, int z = 0, HipColor = HipColor.white, float scaleX = 1, float scaleY = 1, float rotation = 0) drawTexture;

Draws a texture at a specified place

drawTriangle
void function(int x1, int y1, int x2, int y2, int x3, int y3, in HipColor color = HipColor.no) drawTriangle;

Draws an unfilled triangle

fillEllipse
void function(int x, int y, int radiusW, int radiusH, int degrees = 360, in HipColor color = HipColor.no, int precision = 24) fillEllipse;

Draws a filled circle

fillRectangle
void function(int x, int y, int w, int h, in HipColor color = HipColor.no) fillRectangle;

Draws a filled rectangle

fillRoundRect
void function(int x, int y, int w, int h, int radius = 4, HipColor color = HipColor.no, int precision = 16) fillRoundRect;

Draws a filled rectangle with rounded borders

fillTriangle
void function(int x1, int y1, int x2, int y2, int x3, int y3, in HipColor color = HipColor.no) fillTriangle;

Draws a filled triangle

getCurrentViewport
Viewport function() getCurrentViewport;

Gets the active viewport

getWindowSize
int[2] function() getWindowSize;

Width, Height

newHipAnimation
IHipAnimation function(string name) newHipAnimation;

Creates an animation to be iterated

newHipAnimationTrack
IHipAnimationTrack function(string name, uint framesPerSecond, HipAnimationLoopingMode loopingMode = HipAnimationLoopingMode.none) newHipAnimationTrack;

Creates a track for the animation controller

setCameraSize
void function(uint width, uint height) setCameraSize;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setFont
void function(IHipFont font) setFont;

Sets the font for the next drawText commands

setFontDeferred
void function(IHipAssetLoadTask font) setFontDeferred;

Sets the font using HipAssetManager.loadFont

setGeometryColor
void function(in HipColor color) setGeometryColor;

Will change the color for the next calls to drawPixel, drawRectangle, drawTriangle, fillRectangle, fillTriangle, drawLine, drawQuadraticBezierLine

setRendererColorMask
void function(ubyte r, ubyte g, ubyte b, ubyte a) setRendererColorMask;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setRendererErrorCheckingEnabled
void function(bool enable = true) setRendererErrorCheckingEnabled;

Use this only when you're sure you don't need!

setStencilOperation
void function(HipStencilOperation stencilFail, HipStencilOperation depthFail, HipStencilOperation stencilAndDephPass) setStencilOperation;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setStencilTestingEnabled
void function(bool bEnable) setStencilTestingEnabled;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setStencilTestingFunction
void function(HipStencilTestingFunction passFunc, uint reference, uint mask) setStencilTestingFunction;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setStencilTestingMask
void function(uint mask) setStencilTestingMask;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.
setTextColor
void function(HipColor) setTextColor;

Changes textBatch state to use this color

setViewport
void function(Viewport v) setViewport;

Sets active the viewport passed

setWindowSize
void function(uint width, uint height) setWindowSize;
Undocumented in source but is binding to an external library. You might be able to learn more by searching the web for its name.

Structs

Array2D (from hip.util.data_structures)
struct Array2D(T) via public import hip.util.data_structures : Array2D, Array2D_GC;

By using Array2D instead of T[][], only one array instance is created, not "n" arrays. So it is a lot faster when you use that instead of array of arrays.

Meta